<%@ page import="top.wuyang.study.javawebjdbc.workexam.TbExam" %>
<%@ page import="top.wuyang.study.javawebjdbc.workexam.TbExamDAO" %><%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/5/30
  Time: 14:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>数据提交</title>
</head>
<body>

<%
    request.setCharacterEncoding("UTF-8");
    TbExam tbExam = new TbExam();
    tbExam.setSubject( request.getParameter("subject"));
    tbExam.setStudent( request.getParameter("student"));
    tbExam.setScore( Integer.parseInt(request.getParameter("score")));
    tbExam.setLevel( Integer.parseInt(request.getParameter("level")));
    TbExamDAO.insert(tbExam);
%>

<script>
    alert("添加成功")
    location.href = "list.jsp";
</script>

</body>
</html>
